# $Id$
# Maintainer: Sébastien Luttringer
# Contributor: Jens Adam <jra@byte.cx>

pkgname=picocom
pkgver=2.1
pkgrel=2
pkgdesc='Minimal dumb-terminal emulation program, very much like minicom'
url='https://github.com/npat-efault/picocom'
license=('GPL2')
arch=('i686' 'x86_64')
depends=('glibc')
install=$pkgname.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/npat-efault/picocom/archive/$pkgver.tar.gz")
sha1sums=('ddcc98cdeefe1fa57b0349d86254932ae3b0edfe')

build() {
  cd $pkgname-$pkgver
  make UUCP_LOCK_DIR=/run/lock/picocom
}

package() {
  cd $pkgname-$pkgver
  install -D -m 755 picocom "$pkgdir/usr/bin/picocom"
  install -D -m 644 picocom.1 "$pkgdir/usr/share/man/man1/picocom.1"
  # install tmpfiles for lock files
  # http://lists.freedesktop.org/archives/systemd-devel/2011-March/001823.html
  install -D -m 644 /dev/null "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
  echo "d /run/lock/$pkgname 0770 root uucp" \
    > "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}

# vim:set ts=2 sw=2 et:
